package network

import "net"

type Conn interface {
	LocalAddr() (addr net.Addr)

	RemoteAddr() (addr net.Addr)

	Read() (buf []byte)

	ResetBuffer()

	ReadN(n int) (size int, buf []byte)

	ShiftN(n int) (size int)

	BufferLength() (size int)

	SyncWrite(buf []byte) error

	AsyncWrite(buf []byte) error

	// Close closes the current connection.
	Close() error
}
